import IdentityResource from '@/types/dtos/ids/identity-resource';
import axios from '../../plugins/axios';

let service = {
  // 分页
  async getPagedList(json: any): Promise<any> {
    return await axios.post('/api/IdentityResource/GetPagedList', json);
  },
  // 新增
  async insert(identityResource: IdentityResource): Promise<any> {
    return await axios.post('/api/IdentityResource/Insert', identityResource);
  },
  // 更新
  async update(identityResource: IdentityResource): Promise<any> {
    return await axios.put('/api/IdentityResource/Update', identityResource);
  },
  // 删除
  async delete(json: any): Promise<any> {
    return await axios.delete('/api/IdentityResource/Delete', { data: json });
  },
  // 查询列表
  async getList(json: any): Promise<any> {
    return await axios.post('/api/IdentityResource/GetList', json);
  },
  // 查询单条记录
  async get(id: string): Promise<any> {
    return await axios.get('/api/IdentityResource/Get/' + id);
  }
}

export default service;